<include file="public@header" />
</head>
<php>
</php>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('article/index')}">{:lang('文章管理')}</a></li>
			<li class=""><a href="{:url('article/add')}">{:lang('添加文章')}</a></li>
		</ul>
        <form class="well form-inline margin-top-20" method="get" action="{:url('article/index')}">
			关键字:
            <input type="search" class="form-control" name="search" value="{:input('request.search','')}" placeholder="标题或描述关键字">
            分类:
            <select name="cate" class="form-control">
                <volist name="cateList" id="vo">
                    <option value="{$key}" {$cate == $key ? 'selected' : ''}>{$vo}</option>
                </volist>
            </select>
            <input type="submit" class="btn btn-primary" value="搜索" />
            <a class="btn btn-danger" href="{:url('article/index')}">清空</a>
        </form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="50">ID</th>
					<th>标题</th>
					<th>描述</th>
					<td>分类</td>
					<th>内容</th>
                    <th>首页展示</th>
                    <th>图片</th>
                    <th>链接</th>
                    <th>时间</th>
					<th>{:lang('ACTIONS')}</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="list" item="vo">
				<tr>
					<td>{$vo.id}</td>
					<td>{$vo.title}</td>
					<td>{$vo.desc}</td>
					<td>{$vo.cate}</td>
					<td style="width: 60%">{$vo.content}</td>
					<td>{$vo.url}</td>
                    <td>{$vo.is_index == 1 ? '显示' : '不显示'}</td>
                    <td>
                        <a href="javascript:parent.imagePreviewDialog('{:cmf_get_image_url($vo.image)}')">
						    <img src="{:cmf_get_image_url($vo.image)}" style="height: 50px;height: 50px;cursor: pointer"/>
					    </a>
                    </td>
                    <td>{$vo.update_time ? date('Y/m/d H:i', $vo.update_time) : ''}</td>

					<td>
                        <a class="btn btn-xs btn-primary" href='{:url("article/edit",array("id"=>$vo["id"]))}'>{:lang('EDIT')}</a>
						<a class="btn btn-xs btn-danger js-ajax-dialog-btn" href='{:url("article/delete",array("id"=>$vo["id"]))}' data-msg="确定删除吗？">{:lang('DELETE')}</a>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>